<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

</body>
<script>
  let currentYear = new Date().getFullYear()
//es6,旧数组生成新数组map
// let currentYear = new Date().getFullYear()
// let l = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
// let yearList = l.map((t,i)=>{
//   return currentYear + i -5
// })
// let i = Array.from(Array(11))
// let yearList = l.map((t,i)=>{
//   return currentYear + i -5
// })
let yearList = Array.from(Array(11),(t,i)=>currentYear + i -5)

console.log(yearList)

</script>
</html>
